﻿namespace NetFx.SMIL.Definitions
{
  using System;
  using System.Text;
  using System.Collections;

  using System.Reflection;
  using System.Reflection.Emit;
  using System.Runtime.InteropServices;

  using System.Diagnostics;
  using System.Diagnostics.CodeAnalysis;
  using System.Diagnostics.SymbolStore;
  using System.Security;
  using System.Security.Permissions;

  using NetFx.MSIL;
  using NetFx.MSIL.Headers;


  public class AssemblyDefinition : ComplexDefinition
  {
    #region Statics
    public static AssemblyDefinition of(string name)
    {
      return new AssemblyDefinition(name);
    }
    #endregion
    #region Fields
    #endregion
    #region Properties
    public override DefiningPhase InitPhase
    {
      get
      {
        return DefiningPhase.InitDefinition;
      }
    }

    public virtual AssemblyHeader InstanceHeader
    {
      get
      {
        return this.header as AssemblyHeader;
      }
    }
    #endregion
    #region Constructors
    public AssemblyDefinition(string name):this(AssemblyHeader.of(name))
    {

    }
    public AssemblyDefinition(AssemblyHeader header):base(header)
    {
        
    }
    #endregion
    #region Methods
    public virtual ModuleDefinition DefineModule(string name)
    {
      return this.AddDefinition(
        ComplexDefinition.CreateModuleDefinition(name)
        ) as ModuleDefinition;
    }
    #endregion
  }
}